package com.example.gss.entity;

import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
// 
/**
 * 学生实体类，对应数据库中的student表
 */
@Data
public class Student implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    private String studentId;     // 学号
    private String name;          // 姓名
    private String password; // 密码
    private String grade;         // 年级(研一/研二/研三)
    private String tutorId;       // 导师ID
    private Boolean isArchived;   // 档案是否在研究生处
    private Boolean isOnLeave;    // 是否在休学
    private String lastEvaluation;// 上一学年综合素质评价结果(优秀/良好/一般)
    private Boolean hasFailedCourse; // 是否有不合格课程
    private Integer ideologyScore; // 思政基础分(默认20)

    // 无参构造函数
    public Student() {
    }

    // 有参构造函数
    public Student(String studentId, String name, String password, String grade, String tutorId,
                   Boolean isArchived, Boolean isOnLeave, String lastEvaluation,
                   Boolean hasFailedCourse, Integer ideologyScore) {
        this.studentId = studentId;
        this.name = name;   
        this.password = password;
        this.grade = grade;
        this.tutorId = tutorId;
        this.isArchived = isArchived;
        this.isOnLeave = isOnLeave;
        this.lastEvaluation = lastEvaluation;
        this.hasFailedCourse = hasFailedCourse;
        this.ideologyScore = ideologyScore;
    }

    // 重写toString方法
    @Override
    public String toString() {
        return "Student{" +
                "studentId='" + studentId + '\'' +
                ", name='" + name + '\'' +
                ", password='" + password + '\'' + 
                ", grade='" + grade + '\'' +
                ", tutorId='" + tutorId + '\'' +
                ", isArchived=" + isArchived +
                ", isOnLeave=" + isOnLeave +
                ", lastEvaluation='" + lastEvaluation + '\'' +
                ", hasFailedCourse=" + hasFailedCourse +
                ", ideologyScore=" + ideologyScore +
                '}';
    }
}